


import CommonAction from '../../common/action';

import {getAppPageConfig} from '../../../../hrpub/common/utils/utils';


export default class Assignment extends CommonAction {
    constructor(props) {
        super(props);
    }

    appConfig = getAppPageConfig();
    // appConfig = {
    //     appcode:'600705A0',
    //     pagecode:'600705A0p'
    // }
    getOrgData = async (value) => {
        const {reportAss} = this.comp.props;
        
        await this.dispatch({
            type: 'reportAss/update',
            payload: {
                orgValue: value,
                currentTreeData: reportAss.currentTreeData || ''
            }
        });
        this.comp.props.button.setButtonDisabled({
            auth: value && value.refpk ? false : true
        });
        this.getTreeData(value);
        this.getMainTableData({pageInfo:{pageIndex: 1,
            pageSize: 10,
            total: 0,
            totalPage: 1},v:''});
    }
}